home *** CD-ROM | disk | FTP | other *** search
- on buildTranslateTable_ASCIIX
- global ASCIIX
- set theTable to EMPTY
- repeat with i = 0 to 255
- if i = 0 then
- put numToChar(255) after theTable
- next repeat
- end if
- put numToChar(i) after theTable
- end repeat
- set ASCIIX to theTable
- end
-
- on buildTranslateTable_CaseReverseX
- global CaseReverseX, ASCIIX
- buildTranslateTable_ASCIIX()
- set theTable to ASCIIX
- repeat with i = 65 to 90
- put numToChar(i + 32) into char i + 1 of theTable
- end repeat
- repeat with i = 97 to 122
- put numToChar(i - 32) into char i + 1 of theTable
- end repeat
- set CaseReverseX to theTable
- end
-
- on showTable theTable
- repeat with i = 1 to 256
- set tableRecord to padNum(i - 1) & ": "
- put padNum(charToNum(char i of theTable)) after tableRecord
- put " " & char i of theTable after tableRecord
- put tableRecord
- end repeat
- end
-
- on padNum num
- if num < 10 then
- return "00" & string(num)
- end if
- if num < 100 then
- return "0" & string(num)
- end if
- return string(num)
- end
-